<template>
	<a @click="goBack()" href="#" id="btn-goback" class="btn btn-info btn-rounded" v-bind:style="{ right: right + 'px'}"
	 @mouseover="right = 1" @mouseout="right = -20">
		<i class="fa fa-reply fa-lg"></i>
	</a>
</template>

<script>
	export default {
		name: 'btn-goback',
		data() {
			return {
				right: -20
			}
		},
		methods: {
			goBack() {
				console.log('goback $store.state.goback.prePage', this.$store.state.goback.prePage);
				this.$router.replace(this.$store.state.goback.prePage);
			}
		}
	}
</script>

<style scoped>
	#btn-goback {
		position: fixed;
		bottom: 60px;
		width: 40px;
		height: 40px;
		text-align: center;
		padding-top: 10px;
		padding-left: 10px;
	}
</style>
